use std::{future::IntoFuture, ops::Index};

use bytes::Bytes;
// use crate::{minio_client::MinioClientState, models::*};
use anyhow::{anyhow, Error, Result};
use axum::{
    Router,
    routing::{get, post, delete},
    extract::{Extension, Path, Query, State},
    http::StatusCode,
    response::IntoResponse,
};
// use crate::http_helper::*;
use crate::{models, utils::{self, http_helper::*}};
use axum_macros::debug_handler;
use base64::prelude::*;
use chrono::Utc;
use serde::{Deserialize, Serialize};
use serde_json::json;
use tracing::{debug, error};
use uuid::Uuid;

// use sqlx::PgPool;
// use tracing::debug;
use crate::app_error::*;
use crate::models::auth::*;
use crate::models::metainfo::*;
use crate::AppState;
use reqwest::{self, Url};
use std::sync::Arc;
use tower_http::trace::TraceLayer;

pub fn routes(state: Arc<AppState>) -> Router {
    Router::new()
        .layer(TraceLayer::new_for_http())
        .with_state(state)
}